#include "AnimationLayout.h"

#include <QToolButton>
#include <QLabel>

AnimationLayout::AnimationLayout()
{

}



AnimationLayout::AnimationLayout(
    QHBoxLayout* widget)
{
    widget->addLayout(this);
    widget->addSpacing(100);
    this->add_sub_widget();

    QLabel* lab = new QLabel(tr("11"));
    lab->setMaximumWidth(1);
    lab->setMaximumHeight(200);
    lab->setFrameShape (QFrame::Box);
    lab->setStyleSheet("border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);");
    widget->addWidget(lab);
}



AnimationLayout::~AnimationLayout()
{}



void
AnimationLayout::add_sub_widget()
{
    QToolButton* animat_reset = new QToolButton;

    //file_new->setIconSize(QSize(50,50));
    animat_reset->setIcon(QIcon(":/resource/image/reset.png"));
    animat_reset->setToolTip(tr ("重置"));
    this->addWidget(animat_reset);


    QToolButton* animat_speedUp = new QToolButton;
    animat_speedUp->setIcon(QIcon(":/resource/image/speedUp.png"));
    animat_speedUp->setToolTip(tr ("加速"));
    this->addWidget(animat_speedUp);


    QToolButton* animat_speedDown = new QToolButton;
    animat_speedDown->setIcon(QIcon(":/resource/image/speedDown.png"));
    animat_speedDown->setToolTip(tr ("减速"));
    this->addWidget(animat_speedDown);

    QToolButton* animat_play = new QToolButton;
    animat_play->setIcon(QIcon(":/resource/image/play.png"));
    animat_play->setToolTip(tr ("开始"));
    this->addWidget(animat_play);


    QToolButton* animat_stop = new QToolButton;
    animat_stop->setIcon(QIcon(":/resource/image/stop.png"));
    animat_stop->setToolTip(tr ("结束"));
    this->addWidget(animat_stop);
 }
